Change the grant table interface so that gnttab_end_foreign_access_ref returns
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Sun, 30 Oct 2005 15:33:05 +0000 (16:33 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Sun, 30 Oct 2005 15:33:05 +0000 (16:33 +0100)
commit5b4535ea0485e50468357c2a81f2a86c6c0d0ec0
treedd8cd781cc9359232b9feb7df94c0ea4043863d9
parentd68430090025ad7646f256242440ca181bf26ac4
Change the grant table interface so that gnttab_end_foreign_access_ref returns
an error code if the page is still in use, and gnttab_end_foreign_access takes
a page to free.  This allows us to cope with frontends wanting to end access
while backends are still using pages by, eventually, placing the page and
grant table entry on a list, for freeing later.  At the moment, the page and
grant table entry are leaked, with a diagnostic.

Tidied up netfront.c's clean-up code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c
linux-2.6-xen-sparse/include/asm-xen/gnttab.h